@extends('Home.loveser.index')
@section('page')
<div class="col-xs-6" >
    <div class="row" style="border:1px solid #999; width:600px;height:700px">
            <div class="row">
                <div class="col-md-7 col-md-offset-1">
                   <h4> <b>志愿者报名</b></h4>
                <hr>
                </div>
	                <div class="col-md-10 col-md-offset-1 ">
	                   <form role="form" action="{{'/homes/useradd/insert'}}" method="post" >	
	                   	<div class="row">
	                   		<div class="row">
							<label >姓名</label>
	                   		</div>
                              <div class="col-md-9">
                                  
                                  <input class="form-control" name="name" placeholder="请输入姓名">           
                              </div>
                          </div>
                          <br>
                          <div class="row">
	                   		<div class="row">
							<label >选择性别</label>
	                   		</div>
                              <div class="col-md-9">
                                   <select class="form-control" name="sex">
										<option value="0">女</option>
										<option value="1">男</option>
                                  </select>         
                              </div>
                          </div>
                          <br><div class="row">
	                   		<div class="row">
							<label >输入年龄</label>
	                   		</div>
                              <div class="col-md-9">
                                  
                                  <input class="form-control" name="age" placeholder="请输入年龄">           
                              </div>
                          </div>
                          <br> 
                          <div class="row">
	                   		<div class="row">
							<label >联系电话</label>
	                   		</div>
                              <div class="col-md-9">
                                  
                                  <input class="form-control" name="phone" placeholder="请输入联系电话">           
                              </div>
                          </div>
                          
                          
                          <br> 
                          <div class="row">
                              <div class="col-md-9">
                                  <button class="btn btn-Primary" type="submit">提交</button>
                              </div>
                          </div>
                        
                          <br> 

                           {{ csrf_field() }}        
                        </form>
	                </div>
            </div>
         
     </div>
</div>
<div class="col-xs-3" style=" height:800px">
		<div class="row">
			 @if (count($errors) > 0)
		          <div class="alert alert-danger">
		              <ul>
		                  @foreach ($errors->all() as $error)
		                      <li>{{ $error }}</li>
		                  @endforeach
		              </ul>
		          </div>
     		 @endif
		</div>
        <div class="row">
        
      @if (session('success'))
	    <div id="successInfo" class="alert alert-success alert-dismissable col-xs-4 col-xs-offset-3" style="position: absolute;top: 70px;">
            <button type="button" class="close" data-dismiss="alert" aria-hidden="true">×</button>
            {{ session('success') }}
        </div>     
	@endif
	@if (session('error'))
	    
	    <div id="errorInfo" class="alert alert-success alert-dismissable col-xs-4 col-xs-offset-3" style="position: absolute;top: 70px;">
            <button type="button" class="close" data-dismiss="alert" aria-hidden="true">×</button>
            {{ session('error') }}
        </div>     
	@endif
     </div>
  </div>
@endsection
@section('js')
	<script>
	
		// 限制时间
	  setTimeout(function(){
	  	$('#successInfo').hide(2000);
	  	$('#errorInfo').hide(2000);
	  },3000);

	  
	</script>
@endsection